package org.csu.jpetmanage.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
//使用Lombok就不需要写getter和setter方法了
@Builder
@NoArgsConstructor
@AllArgsConstructor
//注入依赖
@Repository
//对应数据库中的表名，使用注解的方式
@TableName(value = "category")
public class Category implements Serializable {
    private static final long serialVersionUID = 3992469837058393712L;
    //定义表的主键值
    @TableId(value = "catid", type = IdType.AUTO)
    //类别的ID
    private String catid;
    //类别名字
    private String name;
    //类别描述
    private String descn;

    public String getCatid() {
        return catid;
    }

    public void setCatid(String catid) {
        this.catid = catid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescn() {
        return descn;
    }

    public void setDescn(String descn) {
        this.descn = descn;
    }
}
